package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BlogLabelMiddleMapper;
import com.ruoyi.system.domain.BlogLabelMiddle;
import com.ruoyi.system.service.IBlogLabelMiddleService;

/**
 * 博客-标签中间Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-07-31
 */
@Service
public class BlogLabelMiddleServiceImpl implements IBlogLabelMiddleService 
{
    @Autowired
    private BlogLabelMiddleMapper blogLabelMiddleMapper;

    /**
     * 查询博客-标签中间
     * 
     * @param id 博客-标签中间主键
     * @return 博客-标签中间
     */
    @Override
    public BlogLabelMiddle selectBlogLabelMiddleById(Long id)
    {
        return blogLabelMiddleMapper.selectBlogLabelMiddleById(id);
    }

    /**
     * 查询博客-标签中间列表
     * 
     * @param blogLabelMiddle 博客-标签中间
     * @return 博客-标签中间
     */
    @Override
    public List<BlogLabelMiddle> selectBlogLabelMiddleList(BlogLabelMiddle blogLabelMiddle)
    {
        return blogLabelMiddleMapper.selectBlogLabelMiddleList(blogLabelMiddle);
    }

    /**
     * 新增博客-标签中间
     * 
     * @param blogLabelMiddle 博客-标签中间
     * @return 结果
     */
    @Override
    public int insertBlogLabelMiddle(BlogLabelMiddle blogLabelMiddle)
    {
        blogLabelMiddle.setCreateTime(DateUtils.getNowDate());
        return blogLabelMiddleMapper.insertBlogLabelMiddle(blogLabelMiddle);
    }

    /**
     * 修改博客-标签中间
     * 
     * @param blogLabelMiddle 博客-标签中间
     * @return 结果
     */
    @Override
    public int updateBlogLabelMiddle(BlogLabelMiddle blogLabelMiddle)
    {
        blogLabelMiddle.setUpdateTime(DateUtils.getNowDate());
        return blogLabelMiddleMapper.updateBlogLabelMiddle(blogLabelMiddle);
    }

    /**
     * 批量删除博客-标签中间
     * 
     * @param ids 需要删除的博客-标签中间主键
     * @return 结果
     */
    @Override
    public int deleteBlogLabelMiddleByIds(Long[] ids)
    {
        return blogLabelMiddleMapper.deleteBlogLabelMiddleByIds(ids);
    }

    /**
     * 删除博客-标签中间信息
     * 
     * @param id 博客-标签中间主键
     * @return 结果
     */
    @Override
    public int deleteBlogLabelMiddleById(Long id)
    {
        return blogLabelMiddleMapper.deleteBlogLabelMiddleById(id);
    }
}
